
<center><div id="message">&nbsp;</div><center>
<?php if($this->Session->read('message')){
	echo '<script>showMessage("mainContent","'.$this->Session->read('message').'");</script>';
	$this->Session->delete('message');	
	}?>
<?php if($this->Session->read('error')){
	echo '<script>showMessage("mainContent","'.$this->Session->read('error').'",1);</script>';
	$this->Session->delete('error');
}?>
	<form id="listForm" name="listForm" method="get" action="#">
    <table class="list">
      <tbody>
      <tr>
      	<th align="center" width="10px">#</th>
      	<th align="center" width="10px"><input class="checkbox"  type="checkbox" name="all" value="" onclick="checka('listForm');" />
        <th align="left"><?php echo $this->Common->columnTitle(_resource('title',true),$uses[0].'.title')?></th>
        <th align="left"><?php echo $this->Common->columnTitle(_resource('keycode',true),$uses[0].'.keycode')?></th>        
        <?php if($webConfig['is_multi_lang']){?>
        <th align="center" width="150px"><?php _resource('languages');?></th>
        <?php }?>
        <th align="center" width="100px"><?php _resource('task');?></th>
      </tr>
		<?php
			if(count($data0)>0){
			foreach($data0 as $k=>$v){
		?>
      <tr class="row<?php echo fmod($k,2)+1;?>" onmouseout="this.className='row<?php echo fmod($k,2)+1;?>'" onmouseover="this.className='highlight'">
      	<td align="center"><?php echo $this->Session->read($uses[0].'.limit')*($this->params['paging'][$uses[0]]['page']-1)+$k+1;?>
      	<td align="center"><input class="checkbox" type="checkbox" id="cb" name="check[<?php echo $v[$uses[0]]['id'];?>]"/>
        <td align="left"><a onclick="deactivateEditors();ajax('addContent','<?php echo $this->params['controller'] ?>/edit/<?php echo $v[$uses[0]]['id'];?>');" href="javascript:;" > <?php echo $v[$uses[0]]['title'];?></a> </td>
        <td align="left"><?php echo $v[$uses[0]]['keycode'];?></td>        
        <!--Language -->
		<?php if($webConfig['is_multi_lang']) {?>
        <td align="center"><?php 
			foreach(explode(',',$webConfig['langs']) as $value)
				if(in_array($value,$v['Langs'])){
					echo '<img style="cursor:pointer;" onclick="deactivateEditors();ajax(\'addContent\',\''.$this->params['controller'].'/edit/'.$v[$uses[0]]['id'].'/'.$value.'\');" class="Tips1" title="'.$listLang[$value].'" 
					border="0" src="'.$this->webroot.'img/backend/flag/'.$value.'.png'.'">&nbsp;&nbsp;';
				}
				else{
					echo '<img style="cursor:pointer;opacity:0.2;filter:alpha(opacity=20);" 
					onmouseover="if(document.all){this.filters.alpha.opacity=100;}else{this.style.MozOpacity=1;}"
					onmouseout="if(document.all){this.filters.alpha.opacity=20;}else{this.style.MozOpacity=0.2;}"					
					onclick="deactivateEditors();ajax(\'addContent\',\''.$this->params['controller'].'/edit/'.$v[$uses[0]]['id'].'/'.$value.'\');" class="Tips1" title="'.$listLang[$value].'" 
					border="0" src="'.$this->webroot.'img/backend/flag/'.$value.'.png'.'">&nbsp;&nbsp;';
				}
			?>
        </td>         
		<?php }?>
        <td align="center">
		<span title="<?php _resource('edit');?>"><a href="javascript:;" onclick="deactivateEditors();ajax('addContent','<?php echo $this->params['controller']?>/edit/<?php echo $v[$uses[0]]['id'];?>');"> <img border="0" src="<?php echo $this->webroot; ?>img/backend/icon-16-edit.png"/></a></span>
		<span title="<?php _resource('delete');?>"><a href="javascript:;" onclick="ajaxSubmit('listContent','<?php echo $this->params['controller']?>/delete/<?php echo $v[$uses[0]]['id'];?>','deleteone','',true);return false;"> <img border="0" src="<?php echo $this->webroot; ?>img/backend/icon-16-trash.png"/></a></span>
	</td>
      </tr>
      <?php } ?>
      <?php } ?>
      
          </tbody>
      </table>
</form>

<div class="pagination">
                <span><?php _resource('display') ?> #
                  <select name="limit" id="limit" class="inputbox" size="1" onchange="ajax('listContent','<?php echo $this->params['controller']?>/display/'+this.value);">
                    <?php 
							for($i=1;$i<10;$i++){
								$v=$i*$webConfig['default_row_per_page'];
								$select=($this->Session->read($uses[0].'.limit')==$v)?'selected="selected"':'';
								echo '<option value="'.$v.'" '.$select.' >'.$v.'</option>';
							}
						?>
                  </select>
                </span>
                <!-- Button prev -->
           
                <?php
                	$paging=$this->Paginator->getPages(); 
							if(isset($paging['prev'])){
								echo $paging['prev'];
							}
							
							
						?>
                <!-- end Button prev -->
                
                    <?php
                    	echo $paging['paging'];
					?>
                  
                <!-- Button next -->
                
                <?php 
							if(isset($paging['next'])){
								echo $paging['next'];
							}
							
						?>
                <!-- end Button next -->
                <span>
                  <?php if(!empty($paging['cboPaging'])){
								echo _resource('goto',true).' # '.$paging['cboPaging'];
							}?>
                </span>
                <span>
                  <?php
								if($paging['totalPage']>0){
								?>
                  Page <?php echo $paging['currentPage']?>/<?php echo $paging['totalPage']?> </span>
                <?php
								}
								?>
                
</div>
<?php echo $this->element('sql_dump'); ?>